<template>
    <view class="back-top" @tap="scrollToTop">
        <text class="iconfont icon-huidaodingbu"></text>
    </view>
</template>

<script>
export default {
    methods: {
        scrollToTop() {
            uni.pageScrollTo({
                scrollTop: 0
            });
        }
    }
};
</script>

<style lang="scss" scoped>
.back-top {
    position: fixed;
    right: 30rpx;
    bottom: 150rpx;
    z-index: 99;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 100rpx;
    height: 80rpx;
    width: 80rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1rpx solid #eee;

    .iconfont {
        font-size: 40rpx;
    }
}
</style>
